﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Reviewlist.aspx.vb" Inherits="task3.Reviewlist" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        <a class="grabit" style="float:none; width:auto" href="/AddReview.aspx">Add New Review</a>
    </p>
    <asp:ListView ID="ListView1" runat="server" DataSourceID="AccessDataSource1">
        <EmptyDataTemplate>
            <span>No reviews found.</span>
        </EmptyDataTemplate>
        <ItemTemplate>
            <a class="" href="/reviewdetail.aspx?id=<%# Eval("ID") %>">
            <%# Eval("Title") %></a>
            <br />
            <asp:Label ID="RequestedbyLabel" runat="server" 
                Text='<%# Eval("postedby") %>' />
            
            Posted date:
            <asp:Label ID="PosteddateLabel" runat="server" 
                Text='<%#  DateTime.Parse(Eval("posteddate").ToString()).ToString("dd-MM-yyyy HH:mm:ss")%>' />
            <br />
            <br />
            <asp:Label ID="DescriptionLabel" runat="server" 
                Text='<%# Eval("content") %>' />
        </ItemTemplate>
    </asp:ListView>
    <p>
        <asp:AccessDataSource ID="AccessDataSource1" runat="server" 
            DataFile="~/App_Data/DealsDb.accdb" 
            SelectCommand="SELECT * FROM [Review]"></asp:AccessDataSource>
    </p>
    <p>
    </p>
</asp:Content>
